This specification relates to logging from obfuscated code.
Stack traces are a type of logging typically used during debugging. Stack traces provide a report of a call stack at a particular point during execution of a program. Each element in the stack trace corresponds to an element in the call stack. When a stack trace is reported, the report typically includes the specific file and line number of the point in source code associated with the element in the call stack corresponding to each stack trace element. This is normally accompanied by the name of a called function name, and may include parameters and variables in scope at the point of call. If the stack trace arises from the throwing of an exception, the report may also display information added to the exception at the point of its creation, such as its type and an associated message.
Programmers can deliberately obfuscate code, e.g., source code or byte code, using a code obfuscator, thereby making the code difficult for humans to understand. In general, this entails renaming almost all symbols within the program, e.g., type names, function names, field names, etc. The renaming is applied in a consistent manner so that the behaviour of the program is not affected. The renaming is typically performed in a semi-random fashion that renders the code incomprehensible to humans. Obfuscation is an important tool for the protection of proprietary software, as it severely impedes the reverse engineering of software.
Stack traces are an important tool in the development and debugging of software, but stack traces generated within obfuscated code can be difficult to comprehend because the function and variable names reported in the stack trace do not correspond to the original function and variable names in the source code that developers work with directly.